1f670f4dad3407cd30d6ac30032ea200e742ee96,opennms-dao/src/main/java/org/opennms/netmgt/dao/castor/AbstractCastorConfigDao.java,AbstractCastorConfigDao,loadConfig,#Resource#,87

Before Change



        Reader reader;
        try {
            reader = new InputStreamReader(resource.getInputStream());
        } catch (IOException e) {
            throw CASTOR_EXCEPTION_TRANSLATOR.translate("opening XML configuration file for resource '" + resource + "': " + e, e);
        }
    
        V config;
        try {
            K castorConfig = CastorUtils.unmarshalWithTranslatedExceptions(m_castorClass, reader);
            config = translateConfig(castorConfig);
        } finally {
            IOUtils.closeQuietly(reader);
        }

After Change


        return ThreadCategory.getInstance(getClass());
    }

    protected V loadConfig(Resource resource) {
        long startTime = System.currentTimeMillis();
        
        if (log().isDebugEnabled()) {
            log().debug("Loading " + m_description + " configuration from " + resource);
        }

        V config = translateConfig(CastorUtils.unmarshalWithTranslatedExceptions(m_castorClass, resource));
        
        long endTime = System.currentTimeMillis();
        log().info(createLoadedLogMessage(config, (endTime - startTime)));